// 元组类型
var a = [1, '张三'];
var a1;
a1 = [2, '李四'];
// 数组类型any
var arr = [1, 2, 3, 4];
var arr1 = [];
arr1 = [5, 6, 7, 8];
var Any = [];
Any = ['zwd', 23, '女'];
// number
var isNumber = 1;
var isNumber1;
isNumber1 = 2;
// string
var isString = 'ZWD';
var isString1;
isString1 = 'ABC';
// boolean
var isfalg = false;
var isflag1;
isflag1 = true;
// 枚举 eunm
var Color;
(function (Color) {
    Color[Color["Red"] = 0] = "Red";
    Color[Color["Green"] = 1] = "Green";
    Color[Color["Blue"] = 2] = "Blue";
})(Color || (Color = {}));
var c = Color.Green;
// console.log(c);
//void 类型像是与any类型相反，
function Voids() {
    console.log('this is void');
}
Voids();
var Voids1 = undefined;
// console.log(Voids1);
// undefined  null 
var isundefined = undefined;
var isNull = null;
// console.log(isundefined,isNull);
// 定义数组
var Arr = ['zhang', 1, false];
var Arr1;
Arr1 = ['zhangsan', 2, true];
// 第一个是字符串  第二个是数组
var StrAny = ['老三', [1, 2, 3, 'ABC']];
console.log(StrAny);
// 常见的js的数组方法
var num = [1, 2, 3, 4, 5];
var b = [11, 12, 13, 14];
num.push(6, 7, 8, 9, 10); //后添加
num.unshift(-2, -1, 0); //前添加
num.pop(); //删除最后一个
num.shift(); //删除第一个
num.concat(b); //合并
num.sort(); //排序
num.slice(); //截取
num.splice(5, 1);
// console.log(num);
// map forEach filter reverse(倒序) join字符串
// pop
function My_pop(str) {
    str.length = str.length - 1;
    return str;
}
console.log(My_pop([1, null, NaN, 2, undefined]));
// push
// let Mypush=(A,B,C)=>{ 
//     console.log(A,B,C);
// }
// console.log(Mypush([1,2,3],'hello','word'));
// console.log(Mypush(['上海','北京','宿迁'],'hello','word'));
//二维数组转一维
function list(arrs) {
    var str = [];
    for (var i = 0; i < arrs.length; i++) {
        for (var j = 0; j < arrs[i].length; j++) {
            str.push(arrs[i][j]);
        }
    }
    // 去重
    var ArrStr = new Set(str);
    return ArrStr;
}
console.log(list([[1, 2, 3], [4, 5, 6], [7, 8, 9, 0, 0, 0]]));
